home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / LIB / SOUND / _gw228.as < prev   
Encoding:
Text File  |  2010-05-14  |  1.5 KB  |  61 lines

  1. package Code.LIB.SOUND
  2. {
  3.    import flash.events.Event;
  4.    import flash.media.Sound;
  5.    import flash.media.SoundChannel;
  6.    import flash.media.SoundTransform;
  7.    
  8.    public class _gw228
  9.    {
  10.       private var iSTransform:SoundTransform;
  11.       
  12.       private var iPList:SoundChannel;
  13.       
  14.       private var iPlaying:Boolean = false;
  15.       
  16.       private var iList:Array;
  17.       
  18.       public function _gw228(param1:SoundTransform)
  19.       {
  20.          iList = new Array();
  21.          iPlaying = false;
  22.          super();
  23.          this.iSTransform = param1;
  24.       }
  25.       
  26.       private function _tn749(param1:Event) : void
  27.       {
  28.          var _loc2_:Sound = null;
  29.          if(iList.length == 0)
  30.          {
  31.             iPlaying = false;
  32.             return;
  33.          }
  34.          _loc2_ = iList.pop();
  35.          iPList.removeEventListener(Event.SOUND_COMPLETE,_tn749);
  36.          iPList = _loc2_.play(0,0,iSTransform);
  37.          iPlaying = true;
  38.          iPList.addEventListener(Event.SOUND_COMPLETE,_tn749);
  39.       }
  40.       
  41.       public function add(param1:Sound) : void
  42.       {
  43.          var _loc2_:Sound = null;
  44.          if(iList.length > 7)
  45.          {
  46.             return;
  47.          }
  48.          iList.push(param1);
  49.          if(iPlaying)
  50.          {
  51.             return;
  52.          }
  53.          iPlaying = true;
  54.          _loc2_ = iList.pop();
  55.          iPList = _loc2_.play(0,0,iSTransform);
  56.          iPList.addEventListener(Event.SOUND_COMPLETE,_tn749);
  57.       }
  58.    }
  59. }
  60.  
  61.